﻿@using System.Security.Claims
@model IEnumerable<iSlideTools.LocalServer.Models.ValidMacAddress>
@{
    ViewData["Title"] = "Mac地址列表";
}
<h2>Mac地址列表</h2>
<p>
    <a asp-action="Create">创建新的Mac地址</a>
</p>
<table class="table">
    <thead>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.UserName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.MacAddress)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsEnabled)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Comments)
        </th>
        <th></th>
    </tr>
    </thead>
    <tbody>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.UserName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MacAddress)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsEnabled)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Comments)
            </td>
            <td>
                <a asp-action="Edit" asp-route-id="@item.Id">编辑</a> |
                <a asp-action="Details" asp-route-id="@item.Id">详细</a> |
                <a asp-action="Delete" asp-route-id="@item.Id">删除</a>
            </td>
        </tr>
    }
    </tbody>
</table>